package org.dromara.school.domain.bo;

import org.dromara.school.domain.Student;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.dromara.school.domain.StudentParent;

import java.util.List;

/**
 * 学生管理业务对象 school_student
 *
 * @author gjb
 * @date 2025-05-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Student.class, reverseConvertGenerate = false)
public class StudentBo extends BaseEntity {

    /**
     * id
     */
    private Long studentId;

    /**
     * 学生姓名
     */
    @NotBlank(message = "学生姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String studentName;

    /**
     * 学号
     */
    @NotNull(message = "学号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long studentNumber;

    /**
     * 学籍号
     */
    @NotNull(message = "学籍号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long studentCode;

    /**
     * 性别
     */
    @NotNull(message = "性别不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sex;

    /**
     * 头像
     */
    private String headSculptureId;

    /**
     * 在读状态
     */
    @NotBlank(message = "在读状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String studentStatus;

    /**
     * 民族
     */
    @NotBlank(message = "民族不能为空", groups = { AddGroup.class, EditGroup.class })
    private String nation;

    /**
     * 居住地址
     */
    @NotBlank(message = "居住地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String address;

    /**
     * 省
     */
    private String province;

    /**
     * 市
     */
    private String city;

    /**
     * 区
     */
    private String districts;

    /**
     * 所属班级
     */
    @NotNull(message = "所属班级不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long classesId;

    /**
     * 所属校区
     */
    @NotNull(message = "所属校区不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long schoolCampusId;

    /**
     * 联系电话
     */
    @NotBlank(message = "联系电话不能为空", groups = { AddGroup.class, EditGroup.class })
    private String contact;

    /**
     * 账号
     */
    private String studentAccount;

    /**
     * 密码
     */
    private String studentPassword;

    /**
     * 备注
     */
    private String remark;


    private String className;

    private Integer classYear;

    private Integer classNum;

    //校区名称
    private String campusName;

    private List<StudentParent> studentParents;

}
